1. Field of the Invention
The present invention relates to a focus detection apparatus and a focus detection method capable of performing focus detection accurately even on a subject such as a point light source in the photographing of a night scene.
2. Description of Related Art
Conventionally there has been used a contrast AF method as an automatic focus detection method of a photographing lens provided for an imaging device. This contrast AF method calculates a contrast value of a subject image formed by the photographing lens, and controls the position of the photographing lens so as to cause this contrast value to have a peak value.
In this contrast AF method, however, it is difficult to perform focus detection accurately on a subject such as a point light source in the photographing of a night scene. Accordingly, there is proposed a method that, when a brightness evaluation value is compared with the threshold value and the brightness evaluation value is larger than the threshold value, the contrast value is corrected by the brightness evaluation value and the focus detection is performed using this corrected contrast value (refer to Japanese Patent Laid-Open Publication No. 2011-175119 (in the following, called “Patent Literature 1”)).
According to a focus detection apparatus disclosed in Patent Literature 1, it is possible to detect a focusing position accurately for the point light source in the photographing of a night scene or the like. It is difficult, however, to detect a focusing position accurately for a subject which is not a point light source and has a low brightness. This point will be explained by the use of FIGS. 9A to 10C.
FIGS. 9A to 9C show AF evaluation values and brightness evaluation values detected using image data acquired while a focus lens is being moved (during lens scan) when the subject is a point light source. In the graph shown in FIG. 9A, the horizontal axis indicates a focus lens position (LDP) and the vertical axis indicates an AF evaluation value (AFval) and a brightness evaluation value. That is, the brightness evaluation value curve LBV10 indicates a change in the brightness evaluation value acquired while the focus lens is being moved, and the AF evaluation value curve LAF10 indicates a change in the AF evaluation value acquired while the focus lens is being moved.
When the peak value of the AF evaluation value curve LAF10 is smaller than the threshold value Th20, correction is not performed on the AF evaluation value as shown in the graph of FIG. 9B. In this case, a true focusing position is the position P2. As shown in the graph of FIG. 9B, however, since the AF evaluation value has peak values at two positions P1 and P3 and the focus detection is performed using these false focusing positions, it is not possible to detect a focusing position accurately.
On the other hand, when the peak value of the AF evaluation value LAF10 is larger than the threshold value Th10, correction is performed on the AF evaluation value as shown in the graph of FIG. 9C. In this case, as shown in the graph of FIG. 9C, the AF evaluation value has the peak value at the position P2 by performing the correction and it is possible to detect an accurate focusing position.
In this manner, when the subject is a point light source subject, the imaging device disclosed in Patent Literature 1 can prevent false focusing and detect a focusing position accurately by the correction of the AF evaluation value. Here, the threshold values Th10 and Th20 are originally the same value and the AF evaluation value varies. In FIGS. 9A to 9C, however, the AF evaluation values are fixed and the threshold values are made different from each other, for convenience in illustration. Illustration is performed in the same manner also in FIGS. 10A to 10C to be described below.
FIGS. 10A to 10C show the AF evaluation value and the brightness evaluation value when the subject is not a point light source. In the graph shown in FIG. 10A also, the horizontal axis indicates a focus lens position (LDP) and the vertical axis indicates an AF evaluation value (AFval) and a brightness evaluation value. That is, the brightness evaluation value curve LBV20 indicates a change in the brightness evaluation value acquired while the focus lens is being moved, and the AF evaluation value curve LAF20 indicates a change in the AF evaluation value acquired while the focus lens is being moved.
When the peak value of the AF evaluation value curve LAF20 is smaller than the threshold value Th20, correction is not performed on the AF evaluation value as shown in the graph of FIG. 10B. In this case, as shown in the graph of FIG. 10B, the AF evaluation value has the peak value at the position P2 and it is possible to detect an accurate focusing position without performing the correction.
On the other hand, when the peak value of the AF evaluation value curve LAF20 is larger than the threshold value Th10, correction is performed on the AF evaluation value as shown in the graph of FIG. 10C. In this case, the corrected AF evaluation value curve LAF20C becomes a curve which varies irregularly due to noise influence by performing the correction and it is difficult to detect a peak value and it is not possible to detect the focusing position accurately, as shown in the graph of FIG. 10C.
In this manner, in the imaging device disclosed in Patent Literature 1, the correction of the AF evaluation value, while can detect a focusing position accurately for an point light source subject, cannot detect a focusing position accurately for a non-point light source subject.